//
//  labelViewCell.m
//  GXKPhotos
//
//  Created by 乐善街 on 16/6/23.
//  Copyright © 2016年 tianchuanshangwu. All rights reserved.
//

#import "labelViewCell.h"

@implementation labelViewCell{
    
    UIImageView *imageView;
    
    UILabel *labelType;
    
    UILabel *titleLabel;
    
    UILabel *moneyLabel;
    
    UILabel *timeLabel;
    
    

}

-(instancetype)initWithFrame:(CGRect)frame{
    
    self=[super initWithFrame:frame];
    if (self) {
        
        imageView=[[UIImageView alloc]initWithFrame:CGRectMake(0, 0, frame.size.width, 85)];
//        imageView.image=[UIImage imageNamed:@"1"];
        imageView.contentMode=UIViewContentModeScaleAspectFill;
        imageView.clipsToBounds=YES;
        [self addSubview:imageView];
        
        labelType=[[UILabel alloc]initWithFrame:CGRectMake(-50, 15, 150, 15)];
        labelType.textAlignment=NSTextAlignmentCenter;
//        labelType.backgroundColor=[UIColor redColor];
        labelType.textColor=[UIColor whiteColor];
        labelType.transform=CGAffineTransformMakeRotation(-M_PI/4.0);
        labelType.font=[UIFont systemFontOfSize:10];
//        labelType.text=@"尚科在线";
        self.clipsToBounds=YES;
        [self addSubview:labelType];
        CGFloat titleY=CGRectGetMaxY(imageView.frame)+10;

        titleLabel=[[UILabel alloc]initWithFrame:CGRectMake(0, titleY,  frame.size.width, 32)];
//        titleLabel.text=@"拉开发大量收点卡了盛大；爱丽丝的房间爱离开时达拉斯的科室领导发军绿色的卡死了都发了";
         titleLabel.font=[UIFont systemFontOfSize:13];
        titleLabel.numberOfLines=0;
        [self addSubview:titleLabel];
        
        CGFloat moneyLabelY=CGRectGetMaxY(titleLabel.frame)+5;
       moneyLabel=[[UILabel alloc]initWithFrame:CGRectMake(0, moneyLabelY,frame.size.width, 20)];
//        moneyLabel.text=@"$ 500";
        moneyLabel.textColor=[UIColor colorWithRed:192/255.0 green:4/255.0 blue:8/255.0 alpha:1];;
        moneyLabel.font=[UIFont systemFontOfSize:13];
        [self addSubview:moneyLabel];
        
         CGFloat timeLabelY=CGRectGetMaxY(moneyLabel.frame);
        timeLabel=[[UILabel alloc]initWithFrame:CGRectMake(0, timeLabelY, frame.size.width, 20)];
//        timeLabel.text=@"5月18日 19:00";
        timeLabel.textColor=[UIColor colorWithRed:153/255.0 green:153/255.0 blue:153/255.0 alpha:1];
        timeLabel.font=[UIFont systemFontOfSize:13];
        [self addSubview:timeLabel];
        
     }
   
    
    
    return self;

}

-(void)showDIC:(NSDictionary *)dic{


    imageView.image=[UIImage imageNamed:@"1"];

     labelType.text=@"国学玄学";
   titleLabel.text=@"拉开发大量收点卡了盛大；爱丽丝的房间爱离开时达拉斯的科室领导发军绿色的卡死了都发了";

    moneyLabel.text=@"$ 500";
    timeLabel.text=@"5月18日 19:00";
      labelType.backgroundColor=[UIColor redColor];
}






@end
